
// Copyright (C) 2011-2012 Luca Piccioni
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//  
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//  
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

using System;

using Derm.Render;
using Derm.Xml.Collada;

namespace Derm.Scene
{
	/// <summary>
	/// A render graph node used for keep track a point of view.
	/// </summary>
	public sealed class RenderCameraGraphNode : RenderGraphNode
	{
		#region Constructors

		/// <summary>
		/// Construct a RenderObjectGraphNode.
		/// </summary>
		/// <param name="identifier">
		/// A <see cref="System.String"/> that identifies this graph node.
		/// </param>
		public RenderCameraGraphNode(string identifier) : base(identifier)
		{
			
		}

		/// <summary>
		/// Construct a RenderObjectGraphNode.
		/// </summary>
		/// <param name="identifier">
		/// A <see cref="System.String"/> that identifies this graph node.
		/// </param>
		/// <param name="renderCamera">
		/// A <see cref="ICamera"/> used for characterising this node. This value can be null.
		/// </param>
		public RenderCameraGraphNode(string identifier, ICamera renderCamera) : this(identifier)
		{
			mCamera = renderCamera;
		}

		#endregion

		#region Associated Camera

		/// <summary>
		/// Object rendered with this node.
		/// </summary>
		public ICamera AssociatedCamera
		{
			get { return (mCamera); }
			set
			{
				// Store camera
				mCamera = value;
			}
		}

		/// <summary>
		/// Associated camera.
		/// </summary>
		private ICamera mCamera;

		#endregion

		#region RenderGraphNode Overrides

		/// <summary>
		/// Get the type of this RenderGraphNode.
		/// </summary>
		public override RenderGraphNodeType NodeType { get { return (RenderGraphNodeType.CameraNode); } }

		/// <summary>
		/// Render only this node.
		/// </summary>
		/// <param name="ctx">
		/// A <see cref="RenderContext"/> used for drawing this node.
		/// </param>
		protected override void RenderThisNode(RenderContext ctx)
		{
			
		}

		#endregion
	}
}
